package carts;

import carts.addition.CalculateProcessor;
import carts.addition.PrisingType;

public abstract class AbstractCart {
    protected CalculateProcessor processor;
    protected int productCount = 0;

    public void addAnotherOne() {
        productCount++;
    }

    public double calculate(PrisingType prisingType) {
        processor.setProductCount(productCount);
        return processor.calculate(prisingType);
    }
}
